package com.hdoit.apollo.logical.stock.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.hdoit.apollo.logical.stock.model.Stock;
import com.hdoit.apollo.logical.stock.model.StockStat;
import com.hdoit.apollo.logical.viewmodel.stock.StockInfo;
import com.hdoit.apollo.logical.viewmodel.stock.StockSearch;
import com.tennetcn.data.dao.base.IMapper;
import com.tennetcn.data.message.PagerModel;

/**
 * @author      humaoshu
 * @email       
 * @createtime  2018年04月02日 11:42:42
 * @comment
 */
@Repository(value="stockMapper")
public interface StockMapper extends IMapper<Stock>{

	public Stock queryModelByKey(@Param("cargoId") String cargoId);

	public StockStat getStockStat(@Param("search") StockSearch search);

	public Stock getStockByCargoNo(@Param("cargoNo") String cargoNo,@Param("shopId")  String shopId);


	public Stock queryModelByCargoId(@Param("cargoId") String cargoId);

	public Stock getStockByCargoId(@Param("cargoId") String cargoId,@Param("shopId") String shopId);

	public Stock queryModelByStockId(@Param("stockId") String stockId);

	public int queryCountList(@Param("search") StockSearch search);

	public List<Stock> queryListList(@Param("search") StockSearch search,@Param("pager") PagerModel pagerModel);

	public List<StockInfo> getListBysearch(@Param("search") StockSearch search);

	public List<StockInfo> getSupplierStocksBysearch(@Param("search") StockSearch search);

}
